<script>
	$(document).ready(function(){
		
		$('#kd_fakultas').change(function(){
			$('#kd_prodi').load(base_url+'prosedur/getProdibyFakultas/'+$('#kd_fakultas').val());
		});
		
		$('#kd_prodi').change(function(){
			$('#kd_dosen').load(base_url+'prosedur/getDosenWalibyProdi/'+$('#kd_prodi').val());
		});
		
		$('#kd_prov').change(function(){
			$('#kd_kabup').load(base_url+'prosedur/OptionKabup/'+$('#kd_prov').val());
		});
		
	});
</script>

<form id="form1" method="post" style="margin:10px;">
	<input type="hidden" name="kd_mahasiswa" id="kd_mahasiswa" value="<?=$kd_mahasiswa?>">
	<div class="fitem" >
		<label style="width:120px">Tahun Angkatan </label>:
		<input name="thn_angkatan" size="15" required="true" value="<?=$thn_angkatan?>">
	</div>
	<div class="fitem" >
		<label style="width:120px">NIM </label>:
		<input name="nim" size="15" required="true" value="<?=$nim?>">
	</div>
	<div class="fitem" >
		<label style="width:120px">Nama </label>:
		<input name="nama" size="20" required="true" value="<?=$nama?>">
	</div>
	<div class="fitem" >
		<label style="width:120px">Tempat Lahir </label>:
		<input name="tempat_lahir" size="30" required="true" value="<?=$tempat_lahir?>">
	</div>
	<div class="fitem" >
		<label style="width:120px">Tanggal Lahir</label>:
			<input class="easyui-datebox" name="tgl_lahir" size="13" value="<?=$tgl_lahir?>" id="tgl_lahir" data-options="formatter:DateFormatter, parser:DateParser">
		<label>
	</div>
	<div class="fitem" >
		<label style="width:120px">Jenis Kelamin</label>:
		<select id="kd_jk" name="kd_jk">
			<option value="">- Pilih -</option>
			<option value="L" <?= $kd_jk == 'L'?'selected ="selected"':''; ?>>Laki - Laki</option>
			<option value="P" <?= $kd_jk == 'P'?'selected ="selected"':''; ?>>Perempuan</option>
		</select></li>
	</div>
	<div class="fitem" >
		<label style="width:120px">Provinsi </label>:
			<select id="kd_prov" name="kd_prov" style="width:200px;">
					<?=$this->mdl_prosedur->OptionKota(array('value'=>$kd_prov));?>
			</select>
	</div>
	<div class="fitem" >
				<label style="width:120px">Kota / Kabupaten  </label>:
				<select id="kd_kabup" name="kd_kabup" style="width:200px;">
						<?=$this->mdl_prosedur->OptionKabup(array('value'=>$kd_kabup, 'kd_prov'=>$kd_prov));?>
				</select>
	</div>	
	<div class="fitem" >
		<label style="width:120px">Alamat </label>:
		<input name="alamat" size="50" required="true" value="<?=$alamat?>">
	</div>
	<div class="fitem" >
		<label style="width:120px">Telepon Siswa </label>:
		<input name="no_telp" size="50" required="true" value="<?=$no_telp?>">
	</div>
	<div class="fitem" >
		<label style="width:120px">Fakultas </label>:
			<select id="kd_fakultas" name="kd_fakultas" style="width:200px;">
					<?=$this->mdl_prosedur->OptionFakultas(array('value'=>$kd_fakultas));?>
			</select>
				<label> </label>
				<label style="width:50px">Prodi  </label>:
				<select id="kd_prodi" name="kd_prodi" style="width:200px;">
						<?=$this->mdl_prosedur->OptionProdi(array('value'=>$kd_prodi, 'kd_fakultas'=>$kd_fakultas));?>
				</select>
	</div>	
	<div class="fitem" >
		<label style="width:120px">Program </label>:
				<select id="kd_program" name="kd_program" style="width:200px;">
						<?=$this->mdl_prosedur->OptionProgram(array('value'=>$kd_program));?>
				</select>
	</div>	
	<div class="fitem" >
		<label style="width:120px">Dosen Wali </label>:
		<select id="kd_dosen" name="kd_dosen" style="width:200px;">
			<?=$this->mdl_prosedur->OptionDosenWali(array('kd_prodi'=>$kd_prodi, 'value'=>$kd_dosen));?>
		</select>
	</div>
	<div class="fitem" >
		<label style="width:120px">Nama Orang Tua </label>:
		<input name="nama_ortu" size="30" required="true" value="<?=$nama_ortu?>">
	</div>
	<div class="fitem" >
		<label style="width:120px">Alamat Orang Tua </label>:
		<input name="alamat_ortu" size="50" required="true" value="<?=$alamat_ortu?>">
	</div>
	<div class="fitem" >
		<label style="width:120px">Pekerjaan </label>:
		<input name="pekerjaan" size="50" required="true" value="<?=$pekerjaan?>">
	</div>
	<div class="fitem" >
		<label style="width:120px">Telepon Orang Tua </label>:
		<input name="telp_ortu" size="50" required="true" value="<?=$telp_ortu?>">
	</div>
	<div class="fitem" >
		<label style="width:120px">Status Mahasiswa</label>:
		<select id="status" name="status">
			<option value="">- Pilih Status -</option>
			<option value="Mahasiswa Terdaftar" <?= $status == 'Mahasiswa Terdaftar'?'selected ="selected"':''; ?>>Mahasiswa Terdaftar</option>
			<option value="Mahasiswa Aktif" <?= $status == 'Mahasiswa Aktif'?'selected ="selected"':''; ?>>Mahasiswa Aktif</option>
			<option value="Mahasiswa Cuti" <?= $status == 'Mahasiswa Cuti'?'selected ="selected"':''; ?>>Mahasiswa Cuti</option>
			<option value="Lulus" <?= $status == 'Lulus'?'selected ="selected"':''; ?>>Lulus</option>
			<option value="Drop Out" <?= $status == 'Drop Out'?'selected ="selected"':''; ?>>Drop Out</option>
		</select></li>
	</div>
</form>
	

